package demo1;

import javafx.application.Application;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 *  <bean id="user" class="demo1.User" />
 * @description: 通过xml加载
 * @author: apple
 * @date:  2022/2/1 10:15 下午
 * @version 1.0
 **/
public class UserTest {

    @Test
    public void testCreate() {

        final ApplicationContext context = new ClassPathXmlApplicationContext("bean1.xml");
//        System.out.println(context + "-->" + context.getClass());
//        final User user = context.getBean("user", User.class);
//        System.out.println(user);
//        user.add();

    }


}
